 /* 与index完全相同的头部样式 */
:root {
    --primary: #6b4f4a;
    --secondary: #3e2723;
    --paper: #f5f0e5;
    --border: #9e8d89;
}
body {
    font-family: '华文楷体', '楷体', serif;
    background: var(--paper) url('data:image/svg+xml,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M20,50 Q40,25 60,50 Q80,75 80,50" fill="none" stroke="%239C8D89" stroke-width="1" opacity="0.1"/></svg>');
    color: var(--secondary);
    line-height: 1.8;
    font-size: 24px;
}

#topnav {
    background: rgba(237, 225, 199, 0.95);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 1rem 0;
    border-bottom: 2px solid var(--primary);
    font-family: '华文楷体', '楷体', serif;
}

.nav-list {
    display: flex;
    gap: 2rem;
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 1200px;
}

.nav-link {
    color: var(--secondary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: var(--primary);
    color: var(--paper);
}

.user-menu {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logout-btn {
    background: #e74c3c;
    color: white !important;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

/* 美化后的内容区域 */
.container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1rem;
}
#locate {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    position: fixed;
    right: 3%;
    top: 50%;  /* 改为视口垂直居中 */
    transform: translateY(-50%);  /* 精确垂直居中 */
    background: rgba(237, 225, 199, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;  /* 子元素垂直水平居中 */
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(107, 79, 74, 0.2);
    z-index: 1000;
    transition: all 0.3s ease;
}

/* 新增链接容器样式 */
.locate-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;  /* 图标与文字间距 */
    text-decoration: none;
    width: 100%;
    height: 100%;
    justify-content: center;  /* 内容居中 */
}

#locate img {
    width: 40px;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.1));
    transition: transform 0.3s ease;
}

#locate .topup {
    font-size: 18px;
    color: var(--primary);
    font-weight: 500;
    margin: 0;  /* 移除默认外边距 */
    line-height: 1;  /* 确保文字行高正常 */
}


h1 {
    text-align: center;
    color: var(--primary);
    /*margin: 2rem 0;*/
    font-size: 2.2rem;
    letter-spacing: 0.5em;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.form-section {
    background: rgba(255,255,255,0.95);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 3rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    color: var(--secondary);
    font-weight: 500;
}

input[type="text"] {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    background: var(--paper);
    transition: all 0.3s ease;
}

input[type="text"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 8px rgba(107, 79, 74, 0.2);
}

input[type="submit"] {
    width: 200px;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    font-size: 1.2rem;  /* 新增：调大字体 */
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(107, 79, 74, 0.3);
}

/* 美化后的表格 */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin: 2rem 0;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    transition: background 0.3s ease;
}

th {
    background: var(--primary);
    color: white;
    font-weight: 500;
}

tr:hover td {
    background: rgba(237, 225, 199, 0.2);
}

/* 排序样式 */
th.sortable {
    cursor: pointer;
    position: relative;
    padding-right: 25px;
}

th.sortable::after {
    content: "↕";
    position: absolute;
    right: 8px;
    top: 55%;
    transform: translateY(-50%);
    opacity: 0.6;
}

th.sorted-asc::after { content: "↑"; opacity: 1; }
th.sorted-desc::after { content: "↓"; opacity: 1; }



/* 操作按钮样式 */
.btn-group {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.edit-btn, .save-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 20px; /* 与删除按钮相同的字号 */
    line-height: 2; /* 统一行高保证垂直居中 */
}

.edit-btn {
    background: #3498db;
    color: white;
}

.save-btn {
    background: #2ecc71;
    color: white;
    display: none;
}

.delete-btn {
    background: #e74c3c;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
}

/* 可编辑单元格 */
.editable {
    position: relative;
    min-width: 100px;
}

.editable:focus {
    outline: 2px solid var(--primary);
    background: var(--paper);
}



@media (max-width: 768px) {
    .container {
        padding: 0 0.5rem;
    }
    table {
        font-size: 0.9rem;
    }
    #locate {
        width: 60px;
        height: 60px;
        right: 3%;
        top: 20%;
    }

    #locate img {
        width: 30px;
    }

    #locate .topup {
        font-size: 14px;
    }
}